package com.olinsports.system.olinsportssystem.manager;

import com.olinsports.system.olinsportssystem.model.MemberInformation;
import com.olinsports.system.olinsportssystem.model.SavingDetail;
import com.olinsports.system.olinsportssystem.service.MemberInformationService;
import com.olinsports.system.olinsportssystem.service.SavingDetailService;
import com.olinsports.system.olinsportssystem.util.MemberInformationExcel;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/7/22.
 */
@Component
public class MemberInformationManager {
    @Autowired
    private MemberInformationService memberInformationService;


    public MemberInformation selectByMemberKey(int memberKey){
        return memberInformationService.selectByMemberKey(memberKey);
    }

    public Map listMembefInfo(String page, String rows,String sord, String sidx){
        return memberInformationService.listMembefInfo(page,rows,sord,sidx);
    }

    public Map searchDate(String page, String rows,String startDate,String endDate){
        return memberInformationService.searchDate(rows,page,startDate,endDate);
    }


    public ModelAndView toDcExcel(String startDate, String endDate, HSSFWorkbook workbook) throws Exception{

        return memberInformationService.toDcExcel(startDate,endDate,workbook);
    }

    public Map searchSelf(String page, String rows,String fieldValue){
        return memberInformationService.searchSelf(page,rows,fieldValue);
    }

    public int saveOrUpdate(MemberInformation memberInformation){
        return memberInformationService.saveOrUpdate(memberInformation);
    }

    public int getSumTotal(){
        return memberInformationService.getSumTotal();
    }

    public MemberInformation selectByVipNum(String vipNum){
        return memberInformationService.selectByVipNum(vipNum);
    }

    public int updateMmberSaving(MemberInformation memberInformation,String comment){
        return memberInformationService.updateMmberSaving(memberInformation,comment);
    }
}
